# from selenium import webdriver

# # 使用 Chrome 浏览器
# driver = webdriver.Chrome(executable_path='/path/to/chromedriver')

# # 或者使用 Firefox 浏览器
# # driver = webdriver.Firefox(executable_path='/path/to/geckodriver')

# # 或者使用 Edge 浏览器
# # driver = webdriver.Edge(executable_path='/path/to/msedgedriver')


from selenium import webdriver
from selenium.webdriver.chrome.service import Service  # 新增导入

# 指定chromedriver路径（替换实际路径）
chrome_driver_path = r'C:\Program Files\Google\Chrome\Application\chrome.exe'

# 创建Service对象
chrome_service = Service(executable_path=chrome_driver_path)

# 初始化驱动
driver = webdriver.Chrome(service=chrome_service)